package com.kuaidi100.sdk.contant;

import java.util.Arrays;
import java.util.List;

public class ExpressCompanyClassifier {

    public static void main(String[] args) {
        List<Class<? extends ExpressCompany>> enumClassList = Arrays.asList(ExpressCompanyGN.class,
                ExpressCompanyGG.class,
                ExpressCompanyYZ.class);
        printExpressCompany(enumClassList);
    }

    public static void printExpressCompany(List<Class<? extends ExpressCompany>> enumClassList) {
        for (Class<? extends ExpressCompany> enumClass : enumClassList) {
            if (enumClass.isEnum()) {
                for (ExpressCompany company : enumClass.getEnumConstants()) {
                    System.out.println(String.format("code: %-20s\tname:%-20s", company.getCode(), company.getName()));
                }
            }
        }
    }

}